import { ElMessage, ElNotification } from "element-plus";
/**
 * 错误提示
 * @param message 提示内容
 * @param duration 提示时间
 */
export function errorTip(message: any, duration = 3000) {
	ElMessage({
		dangerouslyUseHTMLString: true,
		duration,
		type: "error",
		message: message
	});
}

/**
 * 成功提示
 * @param message 提示内容
 * @param duration 提示时间
 */
export function okTip(message: any, duration = 3000) {
	ElMessage({
		dangerouslyUseHTMLString: true,
		type: "success",
		message: message,
		duration: duration
	});
}

/**
 * 警告提示
 * @param message 提示内容
 * @param duration 提示时间
 */
export function warringTip(message: any, duration = 3000) {
	ElMessage({
		dangerouslyUseHTMLString: true,
		type: "warning",
		message: message,
		duration: duration
	});
}

export function noticeTip(title: any, message: any) {
	ElNotification({
		title: title,
		dangerouslyUseHTMLString: true,
		message: message
	});
}
